#!/bin/bash
/*
 cp2foss.php
 SPDX-FileCopyrightText: © 2007 Hewlett-Packard Development Company, L.P.

 SPDX-License-Identifier: GPL-2.0-only
*/
# install script for cp2foss tests MUST BE RUN AS ROOT
# needs access to the svn repository at SourceForge, make sure subversion
# servers file is correct.
# version "$Id: install 626 2008-05-24 03:04:12Z rrando $"

if [[ -x "/usr/local/bin/test.cp2foss" ]]
then
# could put a test in here to see if it is the correct owner... maybe I
# should write this in perl or python....hmmmmm
  :
else
  //cp ../cp2foss.php /usr/local/bin/test.cp2foss
  echo "Please install test.cp2foss into /usr/local/bin"
  exit 1
fi

# ensure owner and permissions are correct
chown fossy:fossy /usr/local/bin/test.cp2foss
chmod ug-w+rx /usr/local/bin/test.cp2foss
chmod o-wx+r /usr/local/bin/test.cp2foss

chmod a+x all_tests.php

# copy archives to tmp

cp archives/* /tmp

# create a dir tree for use (use fossology itself)
cd /tmp
svn co https://fossology.svn.sourceforge.net/svnroot/fossology/trunk/fossology/
